<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>导入在途合格证</title>
		<script src="${contextPath}/scripts/scriptvalidator.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/common.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
		<link href="${contextPath}/styles/default.css" rel="stylesheet" type="text/css" />
	
<style type="text/css">
<!--
#apDiv1 {
	position:absolute;
	left:363px;
	top:21px;
	width:391px;
	height:253px;
	z-index:1;
}
-->
</style>
</head>
<body>
<div class="navigation">
	    <span><a href="javascript:window.history.back();"><img src="${contextPath}/images/back_nav_btn.png" /></a>
	    <a href="javascript:tui();">返回</a>
	    <a href="javascript:window.history.forward();"><img src="${contextPath}/images/go_nav_btn.png" /></a>
	     <a href="javascript:window.history.forward();">前进</a>
	    <a href="javascript:window.location.reload();"><img src="${contextPath}/images/refresh_nav_btn.png" /></a>
	     <a href="javascript:window.location.reload();">刷新</a>
	    </span>合格证管理&gt;&gt;合格证补录&gt;&gt;合格证导入
    </div>
    <div id="loading" style="display:none;position:absolute;left:0;width:100%;height:800px;top:0;background:#E0ECFF;opacity:0.8;filter:alpha(opacity=80);">
	<div id="loading2" style="position:absolute;  cursor1:wait;left:350px;top:200px;width:auto;height:16px;padding:8px 5px 10px 30px;background:#fff url(${contextPath}/images/ajax-loading.gif) no-repeat scroll 5px 10px;border:2px solid #ccc;color:#000;">  
		正在生成数据，请耐心等待 . . .   
	</div>
</div>
    <div class="xt_main_right_center">
<form action="importSearch.do" onSubmit="return checkSubmit();" name="from1" method="post" enctype="multipart/form-data">
<input type="hidden" name="redirectUrl" value='<s:property value='redirectUrl'/>'/>
  <table width="100%" border="0" align="center">
    <tr>
      <td  class="left-td-width-bg"  align="right"><font  color="red" size="2">* </font>选择渠道：</td>
      <td><label>
        <select dataType="Require" msg="请选择渠道"  name="brand.id" id="select">
         <option value="">*****请选择*****</option>
        <s:iterator value="brandList" status="i" id="b">
          <option  <s:if test='brand.id==#b.id'>selected="selected"</s:if>   value="${b.id }">${b.name }</option>
          </s:iterator>
        </select>
      </label></td>
      <td class="left-td-width-bg"  align="right"><font  color="red" size="2">* </font>选择金融机构：</td>
      <td><label>
        <select dataType="Require" msg="请选择金融机构"  name="financial.id" id="select2">
          <option value="">*****请选择*****</option>
          <s:iterator value="fiList" status="i" id="f">
            <option  <s:if test='financial.id==#f.id'>selected="selected"</s:if>   value="${f.id }">${f.name }</option>
            </s:iterator>
          </select>
      </label></td>
      </tr>
    <tr>
      <td class="left-td-width-bg"  align="right"><font  color="red" size="2">* </font>选择文件：</td>
      <td><input  dataType="Require" msg="请选择文件"  type="file" name="file" id="file" ></td>
      <td colspan="2" align="center"><input type="button" onclick="importCer();" class="btn_import" value="">&nbsp;&nbsp;<a href="${contextPath}/excel/cf.xls"></a></td>
      </tr>
    <tr>
      <td colspan="4" align="right"><a href="${contextPath}/excel/cf.xls">模板下载</a></td>
      </tr>
    <tr>
      <td colspan="4" align="center"><s:actionerror /></td>
    </tr>
    <s:if test="reaklMsg != null">
    <tr>
      <td colspan="4" align="center" style="background-color: #F7F709" >${reaklMsg }<br><a href="javascript:shou()"><font  color="red">点击此处返回首页 </font></a></td>
    </tr>
    </s:if>
    </table>
</form>
 </div>
<script  language='javascript'>
function checkSubmit(){
 	var staffForm = document.from1;
	if(!Validator.Validate(staffForm, 3)) {
		return false;
	}
	return true;
 }
 function tui(){
	 window.location.href = "<s:property value='contextPath'/>/cm/index.do";
 }
 function shou(){
	 window.location.href = "<s:property value='contextPath'/>/cm/index.do";
 }
 function importCer() {
		if(checkSubmit()){
			var searchForm = document.from1;
			showLoading();
			searchForm.submit();
		}
		
	}
	function showLoading(){
		var height = window.screen.height-250;   
		 var width = window.screen.width;   
		 var leftW = 300;   
		 if(width>1200){   
		    leftW = 500;   
		 }else if(width>1000){   
		    leftW = 350;   
		 }else { 
		    leftW = 100;   
		 } 
		 $("#loading").css("height",height);
         $("#loading2").css("left",leftW);
         $("#loading").show();
	}
	$(document).ready(function () {
		$("#loading").hide();
	});
	 
</script>

</body>
</html>